PowerTCP Mail for .NET
Attachment Constructor(Byte[],String)




Data for subsequent encoding.
Used to initialize ContentDisposition.FileName and ContentType.MediaType.
Constructor used to create a new Attachment in memory and initialize it with binary data.
Syntax
Public Function New( _
   ByVal content() As Byte, _
   ByVal fileName As String _
)
Dim content() As Byte
Dim fileName As String
 
Dim instance As New Attachment(content, fileName)
public Attachment( 
   byte[] content,
   string fileName
)
public: Attachment( 
   byte[]* content,
   string* fileName
)
public:
Attachment( 
   array<byte>^ content,
   String^ fileName
)

Parameters

content
Data for subsequent encoding.
fileName
Used to initialize ContentDisposition.FileName and ContentType.MediaType.
Remarks

ContentType.MediaType is set using GetMediaTypeFromExtension. TransferEncoding is set to TransferEncoding.Base64. Attachment.ContentDisposition.Inline is initialized to false. Attachment.ContentDisposition.Inline can be set to true if the attachment should be viewed "inline".

Data is accessible through GetContentStream

See Also

Reference

Attachment Class
Attachment Members
Overload List


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic